<!-- 用户服务协议和关于我们 -->
<template>
	<view class="my-content parse" style="overflow: hidden;">
		<div style="height:30rpx"></div>
		<view :style="{height: statusBarHeight + 'px'}"></view>
		<Title :title="title" ></Title>
		<u-parse style="margin-left: 2.5%;
    width: 95%;" :html="list.content" :show-with-animation="true"></u-parse>
	</view>
</template>

<script>
	import Title from './title.vue'
	import {  getContentData } from '@/api/basic'
	export default {
		components: {
			Title
		}, 
		data() {
			return {
				list: {},
				type:'',
				title: '',
				statusBarHeight: uni.getStorageSync('statusBarHeight') || 0,
			};
		},
		onLoad(option) {
			this.type= option.type
			this.title = this.$t(option.type)
			// this.title = option.type
			getContentData({
				type: option.type,
				nowlang: uni.getStorageSync('lang')
			}).then(res => {
				console.log(res);
				this.list = res.data.data
			})
		},
		onReady() {
			uni.setNavigationBarTitle({		//自定义标题
				title: this.$t(this.type)
			})
		}
	}
</script>

<style lang="scss" scoped>
	.parse {
		font-size: 32rpx;
		line-height: 1.8;
	}
</style>